<?php
/**
 * User: hjd-yao
 * Date: 2018/11/5
 * Time: 15:03
 */

namespace App\Http\Controllers;



class BackendController extends Controller
{
    public function getPerPageNum($page = false)
    {
        if($page){
            return $page;
        }

        $per = request()->input('per');
        if (!isset($per)) {
            $per = session('per')?session('per'):10;
        } else {
            session(['per' => $per]);
        }
        return $per;
    }

    public function render($view,$data = [], $mergeData = [])
    {
        return view('backend::'.$view,$data, $mergeData);
    }

}